/**
 * MusicComment.java
 *
 *
 * $LastChangedBy: allen $
 * $LastChangedDate: 2007-11-30 11:28:33 +0800 $
 * $Revision: 1299 $
 */
package com.myspace.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

@Entity(name = "MusicComment")
@Table(name = "MUSIC_COMMENTS")
public class MusicComment extends DomainObject {

	private static final long serialVersionUID = 200711161L;

	private Long id;

	private Long musicId;

	private String content;

	private Long createUser;

	private Date createDate;

// private Picture picture;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_music_comments")
	@SequenceGenerator(name = "seq_music_comments", sequenceName = "SEQ_MUSIC_COMMENTS")
	public Long getId() {
		return id;
	}

	void setId(Long id) {
		this.id = id;
	}

	@Column(name = "MUSIC_ID")
	public Long getMusicId() {
		return musicId;
	}

	public void setMusicId(Long musicId) {
		this.musicId = musicId;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "CREATE_USER")
	public Long getCreateUser() {
		return createUser;
	}

	public void setCreateUser(Long createUser) {
		this.createUser = createUser;
	}

	@Column(name = "CREATE_DATE")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Override
	@Transient
	public boolean isPersistence() {
		return id != null;
	}

}
